var express = require('express');
var router = express.Router();
var sqlQuery = require('../../../module/sql');




//状态
router.post('/state',async(req,res)=>{
  console.log(req.body)
  let sid = req.body.id
  let state = req.body.state
  let sqlStr1 = "update nav set state=? where id=?";
  let result1 = await sqlQuery(sqlStr1,[state,sid])
  res.json({
    state:"ok",
    content:Array.from(result1)
  })
})






  module.exports = router;